home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
027a
/
proplus.zip
/
PROPLUS.DOC
< prev
next >
Wrap
Text File
|
1991-03-30
|
103KB
|
2,801 lines
PROTECTION PLUS
Copy Protection and User Control System
Version 1.0 for Clipper
Copyright (c)1991
All Rights Reserved Worldwide
C.R.S. Software
Eleven Hundred Liberty Avenue Suite 1008
Pittsburgh, PA 15222
(412) 471-SOFT Voice
(412) 471-FAXX FAX
1. Introduction
1.1 Overview
PROTECTION PLUS is the most advanced copy protection and user control system
currently available for Clipper. It is written entirely in Clipper and
Microsoft C.
The PROTECTION PLUS system contains two parts. Part one is the PROPLUS.EXE
program that stores all protection and version information on each customer.
It is very similar to a client tracking program but customized to managing
software. Part two is the actual Clipper library that contains many functions
controlling the copy protection and user control.
No special programming knowledge or experience is required to use PROTECTION
PLUS functions from within any Clipper program - simply include the desired
function calls in the Clipper source code and add the appropriate PROPLUS
library to the application link list.
Like Clipper itself, applications using PROTECTION PLUS require no run-time
license of any kind. One has the ability to protect an unlimited number of
programs. PROTECTION PLUS does not change any disk sector information or
cause any harm to any disk media. PROTECTION PLUS even makes it possible to
hard-code a unique serial number into applications automatically without
recompiling each time. Completely protect and serialize an application in as
little as 5 seconds.
PROTECTION PLUS is easy to use!
1. Add a few lines of source code to the application and recompile.
2. Run PROPLUS.EXE on the application's distribution diskette setting up
various parameters such as serial numbers, demo expiration, etc.
3. The first time your user runs your program, they will be prompted with
a code entry number.
4. Simply load PROPLUS.EXE and bring this user's record up on the screen,
press the F3 key and enter their code entry number. PROPLUS will then
list the code to "add protection." When they enter the code, they
will have complete protection on their hard drive. They can never re-
use the unlock code because the code entry numbers change every time
the application is executed and the unlock codes vary every day as a
function of the code entry numbers. All unauthorized copies of this
program will no longer work and PROPLUS will even keep track if the
user is trying to install the program again on a different computer
once it has already been installed.
Install an application as a DEMO!
1. If the demo expiration date in the client's record of the PROPLUS.EXE
database is non-blank, the application will stop running after that
day. This is an extremely effective way to generate sales. After the
user has been using the application for 30 days free, they may have
loaded so much data that they can not live without it. When it stops
working they will rush out a check to pay for it.
2. Oh, so you ask, what happens when the user keeps backing up the date
and time on their computer? Can they fool PROTECTION PLUS? The
answer is simply no way! If the user tries to back up the date, the
PROTECTION PLUS code is designed to catch them. The program knows
when the program was started as well as when the last session ended.
Each time the program is used, the window for usage gets smaller and
smaller until they must purchase it.
3. If the user would like the demo version to keep running for a few
extra days or a week or even a month, they can call you to get an
unlock code. This way they can continue to use the program while they
send in a payment.
4. When the payment is received, the application can be released from the
demo mode. REMEMBER! It's no longer a demo, but it is still very
copy-protected.
Speaking of PAYMENTS!
1. If any of the software distributed is leased by certain clients, pay
attention! When adding a user to the PROPLUS.EXE database, simply
make them a payment client and enter what day of the month payment is
due. This will insure strict compliance with the payment agreements
because the program will stop running on this date.
2. Each month when a check is received, an unlock code needs to be
entered on the user's computer that will advance them to the next
month. If the payment day falls on a Saturday or Sunday, they will
have full use of the program until the following Monday.
3. Once their payments have been completed, it is possible to give them a
special code that will unlock them forever.
4. REMEMBER! It's no longer locking for payments monthly, but it is
still very copy-protected.
And if that is not enough, PROTECTION PLUS allows one to customize 18 extra
codes that may be used in applications. That is, one can have hidden
procedures in the program that require an unlock code to access them. If a
user forgets their password, for example, they can call and receive a code to
bypass the password-checking function. If it is undesirable for the user to
have the ability to change certain information online, they can call for
special access to that information.
LIST OF FEATURES
1. Copy protect Clipper programs so they will not be handed out.
This increases sales.
2. The unlock codes are different each time the program is loaded. This
means that two users of the same product can not exchange unlock
numbers to gain access to the application software.
3. It is possible to know when a user is trying to install the system on
a different computer than the one the software was originally
installed on.
4. It is possible to remove protection from a computer in order to
reactivate it on a new computer.
5. A hard-coded serial number can be written into the products' .EXE file
without recompiling the source each time.
6. Each copy of PROTECTION PLUS is coded uniquely. No two libraries are
the same.
7. Supports DOS and soon Local Area Networks.
8. There is no need to purchase additional installs. There is no limit
to a certain amount of protected programs. One can use it on as many
programs as he wishes - even in the same directories!
9. PROPLUS.EXE is used as a client tracking program.
10. You can restrict an executable to only executing a certain number of
times. This number is changeable from within the program, if
desired, to extend the program to a possible user.
11. Soon to be available in other languages.
How to use this manual
This manual is divided into two parts. Part one is a reference to the
PROPLUS.EXE program. This is the client tracking and serial numbering
program. Part two contains a function reference to the library, as well as
source samples. In part one of the manual, words in brackets are keys for you
to press. For example: [enter] means press the enter key.
Keep in mind that online help is available through the Norton Guides database
PROPLUS.NG included on the diskette.
1.2 System Requirements
These requirements are not just what we suggest you use, but are the absolute
minimum requirements as to what you will need to run our software package.
IBM PC/XT/AT or compatible
DOS 3 or higher
640 Kb RAM
Hard Drive with at least .5 Mb free
Monochrome / CGA / EGA / VGA Monitor
Any Parallel Text Printer
ClipperTM Summer '87 or 5.0
The program, PROPLUS.EXE will operate on most Networks and Local Area Networks
(LAN). This product is Multi-User.
1.3 Installation
PROTECTION PLUS is supplied on (1) 5.25" or (1) 3.5" diskette(s) and consists
of the following files:
System disk 1
INSTALL.EXE Installation program
INSTALL.DAT
NORTON.LIB Archived Norton Guides database
LIBRARY.LIB Archived Clipper libraries
READ.ME Last minute changes to the manual
DISK.ID Installation program data file
PROGRAM.LIB Archived program files
INSTALL.EXE is the program that copies the files from the floppy distribution
diskette to your hard drive. See below on how to use this program.
PROPLUS.EXE is the program file for the client tracking and serial numbering
of your applications. It is created when the install program is run. Upon
complete installation, this program will create the necessary database files
and indexes it needs.
PPLUSS87.LIB and PPLUS50.LIB are the Clipper libraries. One is for Clipper
Summer '87 and the other is for Clipper 5.0.
PROPLUS.NG is the PROTECTION PLUS Norton Guide database which requires a
Norton Guide reader to use. This reader is distributed with Clipper 5.0.
SAMPLE.PRG is a program that provides a complete example of where the
functions in the PROTECTION PLUS library are logically placed most of the
time. If you would like to utilize all of the protection features of this
system, you should be able to take this example program, change its cosmetics,
and pop it into any of your existing applications.
UNLOCK.EXE is used when an unlock code is needed for a user quickly. This
avoids having to load the client tracking program just to find an unlock code.
READ.ME contains any last minute changes, corrections and information since
the manual was printed and should be read before continuing. It may be viewed
using any ASCII text editor or displayed at the DOS prompt by typing:
C> TYPE READ.ME
If the scrolls off the screen then press the [Pause] key or Control-S to pause
the display and press any other key to continue. Information in the READ.ME
file takes precedence over information in the manual.
Installing the software
To install PROTECTION PLUS, place the distribution diskette in a floppy drive,
access that drive, and type "INSTALL" [enter]. Then follow the directions of
the installation program on your screen. For example, if your floppy drive is
A, type:
C> A: [enter]
A> INSTALL [enter]
The installation program will ask three questions. The first is "On which
hard drive do you wish to install PROTECTION PLUS?" You cannot choose a floppy
drive. The second question prompts "Select the type of PROTECTION PLUS you
wish to install." Your choices are Clipper Summer '87 library, Clipper 5.0
library, or both libraries. All files will be installed to a directory on the
drive you selected called \PROT. The final question asks you if the program
may modify your AUTOEXEC.BAT file to add \PROT to your existing path. We
suggest that you answer "YES" to this question. A copy of your original
AUTOEXEC.BAT file will be created with the extension ".BAK".
After the installation program is complete, you should be in the \PROT
directory on your hard drive. Type "PROPLUS" [enter]. The program will
create all necessary data files and pop up the power-on screen with the C.R.S.
logo. The installation is now complete. However, since the client tracking
program is copy protected, there is one more step to follow. The copy
protection file must be placed on your hard drive. If this is not done, the
program will run in a limited mode allowing only 9 clients. Before 9 clients
is accumulated on your system, you must call Technical Support. The phone
number and hours are located in "User Support" on page . Someone will walk
you through the online registration procedure, which will take no more than
one minute. Proceed to PART ONE of the manual for instructions on how to
use the client tracking program.
NOTE: To assist you in completely understanding the product, we strongly
encourage you to read the section "Commonly asked questions" on page .
1.4 License Agreement
C.R.S. hereby grants you a non-exclusive, non-transferable license to use this
product on one Central Processing Unit (CPU) only. The following paragraphs
contain the agreement which you ("I" in the text) agree to be bound, by
opening the sealed diskette packaging.
I understand that the PROTECTION PLUS logo, product names, software, manuals,
documentation and other materials are either patented, copyrighted,
trademarked or owned by C.R.S. as trade secrets or proprietary information. I
agree not to remove any product identification or notices of such proprietary
restrictions from C.R.S.'s products.
I agree that I will only make copies for use as archival backup copies, and
only if such copies are for my personal use. Any copying of materials or
documentation is prohibited.
Government license
If you are acquiring the software on behalf of any unit or agency of the
United States government, the following provisions apply:
The government acknowledges C.R.S.'s representation that the software and its
documentation were developed at private expense, and no part of them is in the
public domain.
The government acknowledges C.R.S.'s representation that the software is
"restricted computer software" as that term is defined in clause 52.227-19 of
the Federal Acquisition Regulations (FAR) and is "commercial computer
software" as that term is defined in sub-part 227.471 of the Department
of Defense Federal Acquisition Regulation Supplement (DFARS). The government
agrees that:
(I) If the software is supplied to the Department of Defense (DOD), the
software is classified as "commercial computer software" and government is
acquiring only "restricted rights" in the software and its documentation
as the term is defined in clause 252.227-7013 (C)(1) of the DFARS, and
(II) If the software is supplied to any unit or agency of the United States
government other than DOD, the government rights in the software and its
documentation will be as defined in clause 52.227-19 (C)(2) of the FAR.
Restricted rights legend
Use, duplication, or disclosure by the government is subject to restrictions
as set forth in sub-paragraphs (C)(1)(ii) of the rights in technical data and
computer software clause at DFARS 252.227-7013. C.R.S., 1100 Liberty Avenue
Suite 1008, Pittsburgh, PA 15222.
C.R.S. warrants that the magnetic media on which the enclosed computer program
is recorded is free from defects in materials and workmanship under normal
use. C.R.S. warrants that the computer program will perform substantially in
accordance with the user manual. The warranty covering the magnetic media
and computer program is made only for ninety (90) days from the date of
delivery of the program to me or my company as a user.
I agree to return this defective item shipping prepaid during the warranty
period, and C.R.S. must receive it within thirty (30) days of the end of this
warranty period.
I agree to either insure the defective item being returned or assume the risk
of loss or damage in transit. All warranty claims must be addressed to:
C.R.S.
Eleven Hundred Liberty Avenue Suite 1008
Pittsburgh, PA 15222
Any claim under the above warranty must include a dated proof of the date of
delivery, such as a copy of my receipt or invoice. I agree to return the
defective item shipping prepaid to C.R.S. during the warranty period. I agree
that C.R.S.'s liability for damages to the user or others resulting from
use of the computer program shall not exceed the amount of the license fee
payable to C.R.S. under this Agreement.
I AGREE THAT C.R.S. SHALL NOT IN ANY CASE BE LIABLE FOR SPECIAL, INCIDENTAL,
CONSEQUENTIAL, INDIRECT OR OTHER SIMILAR DAMAGES ARISING FROM ANY BREACH OF
THESE WARRANTIES, EVEN IF C.R.S. OR ITS AGENT HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
This means that C.R.S. is not responsible for any costs, including, but not
limited to, those incurred as a result of lost profits or revenue, loss of use
of the computer program, loss of data, costs of re-creating lost data, the
cost of any substitute program, claims by any party other than me, or for
other similar costs.
I understand that some states do not allow the exclusion or limitation of
incidental or consequential damages, so the above limitation or exclusion may
not apply to me.
I agree that any breach of one or more of the provisions of this agreement by
me shall constitute an immediate termination of this agreement.
Nevertheless, I agree that in the event of such termination, all provisions of
this agreement which protect the rights of C.R.S. will remain in force.
1.5 User Support
We thank you for purchasing PROTECTION PLUS! This manual contains a
description of the features and capabilities of the program. However, if you
have any questions left unanswered, or if you discover problems with any part
of the program or this manual, please feel free to call the our Technical
Support line at 412/471-SOFT, 10am-5pm, EST Monday through Friday.
1.6 Trademark Acknowledgements
Clipper ----------------> Nantucket Corporation
MS Link ----------------> Microsoft Corporation
PLINK86plus ------------> Phoenix Technologies Ltd.
Turbo Link -------------> Borland International
Blinker ----------------> Blink, Inc.
Norton Guides ----------> Peter Norton Computing
CompuServe -------------> CompuServe Information Service
Other brand and product names used in this documentation may be registered
trademarks of their respective owners. Their use in this manual are for
identification purposes only.
2. PART ONE - PROPLUS.EXE
2.1 Initial Installation
When PROPLUS comes up running the first time, you will be asked to enter your
company's name. This name will be included in the header of all reports
generated by PROPLUS.
╓─────────────────────────────────────────────────────────────╖
║ Initial Installation ║
║ ║
║ Registered User: ║
╙─────────────────────────────────────────────────────────────╜
Enter Name to be PERMANENTLY imbedded in all report titles.
After entering your company name, files will be created and reindexed for the
first time and you will then see the POWER-UP Banner Screen. The power-up
screen will either disappear after 20 seconds or you can press any key to move
to the main menu quicker.
2.2 Main Menu
┌─────────────────────────────────────────────────────────────────────┐
│ ┌──────────────────────────────────────────────────────────────────┐│
│ │ Protection Plus for Clipper v1 * DEMO * ││
│ │ Copyright (c) 1991 - C.R.S. - All Rights Reserved ││
│ └──────────────────────────────────────────────────────────────────┘│
│ │
│ ╔══ Protection Plus ═══╗ │
│ ║1. Customer Setup ║ │
│ ║2. Master Settings ║ │
│ ║3. Product Picklist ║ │
│ ║4. Reports Menu ║ │
│ ║5. Utilities Menu ║ │
│ ║6. Disk Picklist ║ │
│ ║7. Program Information║ │
│ ╚══════════════════════╝ │
│ │
├─────────────────────────────────────────────────────────────────────┤
│Add / Edit / Delete customers, protect diskettes & find unlock codes.│
└─────────────────────────────────────────────────────────────────────┘
The first time that you run PROPLUS, you will notice that it is in the DEMO
mode. You will have to call C.R.S. at 412-471-SOFT(7638) 10am to 5pm EST
Monday - Friday. We will give you the code that will unlock your PROPLUS.
Until you call us, you can add as many products and customers to your database
as you want, however, you can not protect any disks.
2.3 Master Settings
╓───────────────────────────────────────────────────────────────────╖
║ Protection Plus for Clipper / Master Settings ║
╠═══════════════════════════════════════════════════════════════════╣
║ Your Company Name: C.R.S. ║
║ Address: 1100 Liberty Ave, Suite 1008 ║
║ Address: Pittsburgh, PA 15222 ║
║ Phone: 412-471-7638 ║
║ Fax #: 412-471-3299 ║
╠═══════════════════════════════════════════════════════════════════╣
║ Default Expiration Type: N Distributor: Y ║
║ Codes: Page ║
║ Payment are due on the: 20 day of the month ║
║ Demo will work for: 10 days and then stop. ║
╠═══════════════════════════════════════════════════════════════════╣
║ The default protected program execution limit is 0. ║
╠══════════╦══════════╦════════════╦════════════╦═══════════════════╣
║ TONES ║ Get Y ║ Error Y ║ Alert Y ║ ESC = Main Menu ║
╙──────────╨──────────╨────────────╨────────────╨───────────────────╜
The top box is where you will enter your own company information. All of this
information gets stored in the protection control files that we will be
talking about later.
The next box of information has to do with your default protection.
2.3.1 Default expiration type
When you are editing this field, a pop-up window will show you the 4 types of
expiration. Simply press the first letter of the type you choose or cursor to
the type and press enter.
┌ Expiration Types ┐
│Payments │
│Demo │
│None │
│Exe Count │
└──────────────────┘
Payments -------> If most of your customers are paying you monthly
payments for your software, you would select this
expiration type.
Demo -------> If most of the programs you sent out are set up as demo
versions, select demo.
None -------> Will add no expiration to the program.
Exe Count -------> Will cause the program to stop after "n" number of
program executions.
2.3.2 Distributor
Let's say you have a product that you sell to a software distributor and let's
say they order your product in lots of 100. Defining the distributor would
allow you to mass produce your program diskettes without having to enter the
same info over and over each time. Later when an end user calls to get
unlocked, you can update their protection control file using the pp_savepp()
function from your PROPLUS.LIB.
┌────────────────────────────────────────────────────┐
│ Product: │
│ Distributor: │
│ Address: │
│ City: │
│ State: │
│ Zip Code: │
│ Disk Size: │
└────────────────────────────────────────────────────┘
By hitting the [enter] key on the Product and Disk Size fields, you will be
prompted with a pop up picklists to choose from.
2.3.3 Codes
Protection Plus allows you to define up to 18 protection codes. Here is where
you define each of the code names.
┌────────────────────────────────────────────────────────────────┐
│ Define the 18 available Unlock Code Names. │
╞════════════════════════════════════════════════════════════════╡
│ 1. UNLOCK EXPIRE DATE 10. CREATE PROTECTION FILE │
│ 2. PAYMENT UNLOCK 11. │
│ 3. KILL PROTECTION FILE 12. │
│ 4. EXTEND DEMO USAGE 13. │
│ 5. BYPASS DATE CHECK 14. │
│ 6. UPDATE CONTROL FILE 15. │
│ 7. 16. │
│ 8. 17. │
│ 9. 18. │
└────────────────────────────────────────────────────────────────┘
2.3.4 Payments are due on
If your company has a payment plan, here is where you tell PROPLUS the day of
the month that your payments are due. This will allow you to cause the users
software to stop working after that date. We have had fabulous results in
collecting our A/R when we use this protection. Your customer will simply
call you monthly to get the next month unlock code.
2.3.5 Demo will work for
If you send a full running program to a prospective customer and place it in
the DEMO type expiration, you can tell PROPLUS how many days to let the
program function. Their demo will stop after n number of days. If the
customer used your program long enough and likes it, they will purchase it
from you and you will give them a new code to unlock it all the way.
The tone toggles are, Yes or No questions. If you want the GET beep answer Y.
The GET beep is when you fill a field. The ERROR beep is when you enter un-
validatable data and ALERT beep is when the program is trying to alert you to
look at the screen. You will see alert messages at the bottom of the screen.
2.4 Product Setup
Simply enter the product name, EXE name (for serializing only) and the version
number. After you enter one product, you will have a browse screen to look at
the product list.
╓────────────────────────────────────────────────────────╖
║ Product Setup Screen ║
║ ║
║ Product Name: ║
║ Product EXE Name: (no extension) ║
║ Version Name: ║
║ Next Serial#: ║
║ EXE name is only required if you plan on using ║
║ HARD Serial Number Stamping your program. ║
╙────────────────────────────────────────────────────────╜
2.4.1 Next serial number
It is the next available serial number to be given to the next program that
you protect. This number gets advanced each time you protect a new program.
For each of your different products, you should try and space your serial
numbers by 5000. This will keep the serial numbers unique and keep serial
numbers from one product from overlapping to another product.
2.5 Reports Menu
╔═ Reports Menu ═╗
║1. Printer Setup║
║2. Print Reports║
╚════════════════╝
2.5.1 Printer setup
╔════════════════════════════════════╗
║ List of Printer Configurations ║
╠═══╤══════════════════════════════╤═╣
║Con│ Printer Name │N║
╟───┼──────────────────────────────┼─╢
║CIT│Citizen MSP-10/20 │0║
║HP │Hewlett Packard Laser Jet II │0║
║IBM│IBM Proprinter │0║
║OTC│Output Technologies │0║
║ │ │ ║
╚═══╧══════════════════════════════╧═╝
The PRINTER SET-UP UTILITY will allow you to define your own printer
configurations in addition to the four (4) standard configurations included
with the program.
1. To view/edit a configuration, highlight it with the cursor keys, and
press [Return]. A window will appear displaying the information for
that printer configuration.
╓────────────────────────────────────────────────────────────╖
║ Configuration ID...: IBM ║
║ Printer Description: IBM Proprinter ║
║ Network Printer No.: 0 ║
║ Reset String.......: \018 ║
║ ║
║ Setup String Width Len║
║ ___________________________________ _____ ___║
║Level 1 \018 80 60║
║Level 2 \027: 96 60║
║Level 3 \015 217 60║
╙────────────────────────────────────────────────────────────╜
a. The CONFIGURATION ID is a unique identifier to identify the printer
configuration.
b. The PRINTER DESCRIPTION is a brief description of the printer. It
should contain information relevant as to what features the
configuration has.
c. The NETWORK PRINTER NUMBER is the printer that all reports should be
routed to. If the system is running a network, the number should
correspond to the network assigned printer number, where the first
network printer is labeled one (1). If the program is running on a
stand alone system, the number should correspond to the first parallel
printer port on the PC. The number should then be set to zero (0).
d. The RESET STRING is the escape sequence that will be sent to the
printer on completion of a report. This should also be set as to reset
the printer to its default power-up condition.
e. Next are three sets of set-up strings, widths, and lengths. The REPORT
GENERATOR uses these to determine how to lay out the lines of text.
The REPORT GENERATOR automatically selects the one best suited for the
report. If one line of the report is too wide for Width 1, but is less
than Width 2, the second set-up string will be used. If it is wider
than Width 2, then Width 3 will be used. If the report is still too
wide, the REPORT GENERATOR will utilize more than one line on the page
per record printed, printing only as many fields on each line as will
fit without breaking and will wrap to the next line. If a line has to
wrap, the REPORT GENERATOR will automatically adjust the number of
lines per page since fewer records will fit on a page. Refer to your
owners manual for the codes relevant to your printer.
2. To edit any of the fields, enter its number, and press [return].
3. To leave, press the [ESC] key.
4. If any changes were made, you will be presented with a prompt that will
ask to Accept, Retry, or Cancel. If all changes are correct, then press
[A]. If you wish to edit a field, then press [R]. Should you decide
that you do not want the changes to be saved, then press [C].
2.5.2 Printing reports
This option allows users to generate reports by File Name. Each File Name
includes one or more Field Titles. Each Field Title has different data that
may be chosen for a report.
1. Field Titles may be given a range by assigning an upper, and lower
limit. The user may also request that a Title Total be reported by
typing [Y] when prompted by; "Would you like a total figure on this
title (Y/N)"?
2. Use the cursor keys to highlight the File Name that you want to
generate a report on.
3. Press [Return]. The Report Title window will then appear. Names of
previously created report will be listed. The window will be empty if
no reports have been created.
4. To create a report, press the [INS] key. A window will appear. Enter
the name of the report that you wish to create, and press [Return].
5. At this time, you will be asked for a printer configuration file to be
used for the report. By pressing return, a window will appear with your
current printer configurations in it. Use the cursor keys to highlight
the configuration file that you wish to use, and press [Return].
6. You will then be returned to the window with your report name in it.
Highlight the report name using the cursor keys, then press [Return].
7. Press the [INS] key to bring a window up that will allow you to select
the available titles for your report. High-light your choice, then
press [Return].
8. You will then be presented with a window that will allow you to choose
the fields that you want contained in the report. By highlighting the
field that you want, then pressing [Return], it will select that field.
9. Additional fields may be selected by repeating steps 7 & 8.
10. An Upper and Lower limit may be placed on the fields in your report.
Entering a range will limit the sorting to data belonging to or falling
within the Upper and Lower limits of the range specified.
11. To enter a range for a field, highlight the field, and press [Return].
A window will appear requesting a Upper limit, Lower limit, and if you
wish to have the field total at the conclusion of the report.
12. To enter additional ranges, repeat step 11.
13. Once you have finished adding titles, and ranges to your report the
[ESC] key should be pressed. A window will appear presenting you with
all the information that you have selected for your report.
14. A prompt will appear. Press [Y] to save & print the report. Press [N]
to save the report to disk.
15. If you press [Y] then you will be presented with a prompt asking for an
optional heading for the report. Enter up to two lines of text followed
by a [Return].
16. After this point you will be asked to select what sort option you wish
to use for your report. Highlight the option that you wish to use, then
press [Return].
17. Your report will then begin to print. To abort the printout at any
time, just press a key. You will be returned to the main menu.
2.6 Utilities Menu
╔════ Utilities Menu ════╗
║1. Adjust ProPlus Colors║
║2. Sort & Reindex Files ║
╚════════════════════════╝
2.6.1 Adjusting colors
Option 1, Adjust Colors allows you to choose your own color settings of
PROPLUS.EXE.
2.6.2 Sort and reindex files
Option 2 will pack and reindex all PROPLUS files.
2.7 Disk Picklist
This allows you to tell PROPLUS your drive configuration.
╓────────────────────────────────────────────────────────────────╖
║ ┌────────────────────────────────┐ ║
║ │████████████████████████████████│ ║
║ │██████████████████████████████ █│ ║
║ │████████████████████████████████│ ║
║ Disk Size Configuration │████████████████████████████████│ ║
║ │████████████████████████████████│ ║
║ Disk Size 3 1/2 │████████████████████████████████│ ║
║ Drive B: │████████████████████████████████│ ║
║ │████████████████████████████████│ ║
║ │████████████████████████████████│ ║
║ │█████ ███████████│ ║
║ │█████ ████ ███████████│ ║
║ │█████ ████ ███████████│ ║
║ │█████ ████ ███████████│ ║
║ │█████ ███████████│ ║
║ └────────────────────────────────┘ ║
╙────────────────────────────────────────────────────────────────╜
2.8 Customer Setup
This is where you will maintain your customers. If you haven't added any
customers yet you will be prompted with the following screen.
┌──────────────────────────────────────────────────────────────────┐
│ Protection Plus for Clipper / Customer Screen │
├──────────────────────────────────────────────────────────────────┤
│Purchasing Company: │
├──────────────────────────────────────────────────────────────────┤
│ Product Purchased: Version: │
│ EXE File Name: EXE Serial #: 1002 │
├──────────────────────────────────────────────────────────────────┤
│Users Name: │
│ Address: │
│ City: State: Zip: │
│ Phone: Fax: │
├──────────────────────────────────────────────────────────────────┤
│ Disk Size: Drive: Date Shipped: 03/11/91 │
│ Expiration Type: N Expiration Date: / / │
│Expiration Count: 0 Date Installed: / / │
│ Protection #: 0 Comments: NotePad │
├──────────────────────────────────────────────────────────────────┤
│ F2 = Protect a Diskette F3 = View Unlock Codes │
└──────────────────────────────────────────────────────────────────┘
If you are entering a new customer, simply fill out the record. This is
pretty much straight forward.
1. Type the Company Name. If you have previously added this company, you
will be alerted that this company already exists, but you will be
allowed to continue. That's because it is possible for a company to
own more than one of your software programs.
2. The next field is the Product name. If you have a blank field here,
simply press the [enter] key and a product picklist will appear on your
screen. Select the correct product and press [enter]. You can also
add a new product to the product pick list from here. When you select
a product, the Version, EXE Name and Serial Number fields on your
screen will be filled in for you. You should have no reason to change
those fields.
3. Other fields such as disk size and expiration type offers a picklist.
Simply choose the item from the picklist and press enter and the data
will be copied into your field.
4. The NotePad field is a Clipper Memo field. You may store all kinds of
extra info here.
5. The Protection # offers you the ability to tell if a user of your
protected software is trying to install your program on a different
computer than the one they originally installed it on. After you have
a few customers entered into your database, you will be prompted with a
browse screen. You can use your cursor keys to browse through the
fields or enter the first few letters of the company name and press
enter. This will pop you right to the first occurrence of that
company. Normally, the company name is the active browse key. If
you would like to browse by one of the other keys, press the
[F10] key and the pop-up key choice window will appear. Select the key
that you would like to use and it then becomes active.
╔═ Select Key Field ═╗
║1. Company Name ║
║2. Product ║
║3. Ser. # ║
║4. ST ║
║5. Exp. Date ║
║6. Protection ID ║
╚════════════════════╝
┌──────────────────────────────────────────────────────────────────┐
│ Protection Plus for Clipper / Customer Screen │
├──────────────────────────────────────────────────────────────────┤
│Purchasing Company: │
├──────────────────────────────────────────────────────────────────┤
│ Product Purchased: Version: │
│ EXE File Name: EXE Serial #: │
├──────────────────────────────────────────────────────────────────┤
│Users Name: │
│ Address: │
│ City: State: Zip: │
│ Phone: Fax: │
├──────────────────────────────────────────────────────────────────┤
│ Disk Size: Drive: Date Shipped: / / │
│ Expiration Type: N Expiration Date: / / │
│Expiration Count: Date Installed: / / │
│ Protection #: Comments: NotePad │
├──────────────────────────────────────────────────────────────────┤
│ F2 = Protect a Diskette F3 = View Unlock Codes │
└──────────────────────────────────────────────────────────────────┘
When you hit [enter] on a customer name, you will be in the edit mode. Simply
cursor to the desired field you want to edit and press [enter] and change the
field. When you are finished editing press [esc] and your changes will be
recorded.
2.9 Protecting Disks
When you are finished adding the record, re-select it as if you are editing
it. At that point you may press the [F2] key and add the protection to the
floppy disk.
If you named an .EXE file in the product, make sure that it is on the diskette
so that its serial number can be recorded correctly.
The following messages will be displayed when you add protection to a disk.
** ERROR **
Drive A: not ready or not formatted.
Press any key to continue
This message means that the diskette in the drive needs formatted, you forgot
to shut the drive latch or some other reason that would cause PROPLUS not to
read the disk.
** WARNING **
Drive A: already has a protection control file for this
application. Press 'y' to continue, any other key to abort.
This message means that the diskette in the drive already has a protection
control file on it. If you would like to overwrite it, press the [y] key.
** NOTICE **
Protection Plus control file created. Product EXE not serialized.
The EXE name is missing from the product database screen.
This message means that the diskette in the drive now contains the protection
control file. It also indicates that the .EXE file was not serialized because
you did not name the .EXE file name in your product database.
** NOTICE **
Protection Plus control files created. Product EXE not serialized.
The file YOURFILE.EXE is missing on the destination drive.
This message means that the diskette in the drive now contains the protection
control file. It also indicates that the .EXE file was not serialized because
you named the .EXE file name in your product database, however the .EXE file
on your product diskette is missing.
** NOTICE **
Protection Plus control files created. Product EXE has not been
serialized. The serial() function is missing from the program YOURFILE.EXE.
Check your program to make sure the function serial() exists.
This message means that the diskette in the drive now contains the protection
control file. It also indicates that the .EXE file was not serialized because
either, you forgot to insert the function serial() in your main .PRG file or
you have already protected the file.
Protection Plus control files created.
Product EXE has been serialized.
Press any key to return.
This message means that the diskette in the drive now contains the protection
control file and the .EXE file has been modified.
2.10 Unlock Codes
When a user calls to receive an unlock code from you, you can press the [F3]
key from anyplace in PROPLUS. The following screen will appear.
┌─────────────────────────────────────┐
│ Code Entry Number from user: 1234│
├──┬─────────────────────────┬────────┤
│ 1│UNLOCK EXPIRE DATE │ 3245098│
│ 2│PAYMENT UNLOCK │ 3369862│
│ 3│KILL PROTECTION FILE │ 3494626│
│ 4│MAKE DEMO EXP. 4/10/91 │ 3619390│
│ 5│BYPASS DATE CHECK │ 3744154│
│ 6│ │ 0│
│ 7│ │ 0│
│ 8│ │ 0│
│ 9│ │ 0│
│10│CREATE PROTECTION FILE │ 4367974│
│11│ │ 0│
│12│ │ 0│
│13│ │ 0│
│14│ │ 0│
│15│ │ 0│
│16│ │ 0│
│17│ │ 0│
│18│ │ 0│
└──┴─────────────────────────┴────────┘
Ask the user for their code enter number and type it in. A different number
will be displayed for each code.
2.11 UNLOCK.EXE
UNLOCK.EXE is used to obtain the unlock codes without having to load
PROPLUS.EXE. This program is not to be distributed. Here is the way it
works.
Usage: UNLOCK <code number>
The code number is the code entry number that your customer will read to you.
C:\PROT>unlock 12345
You are not authorized to distribute this Unlock program. It is the property
of C.R.S. and contains trade secret information. This program is not to be
released under any conditions (without expressed written consent of C.R.S.) to
anyone other than licensee's of Protection Plus(tm).
Protection Plus (tm) is Copyright (c)1989-1991 by C.R.S. Call us at 412-471-
7638 for assistance with this program.
Unlock codes for 12345:
Code 1: 10074792 Code 2: 10462284
Code 3: 10849776 Code 4: 11237268
Code 5: 11624760 Code 6: 12012252
Code 7: 12399744 Code 8: 12787236
Code 9: 13174728 Code 10: 13562220
Code 11: 13949712 Code 12: 14337204
Code 13: 14724696 Code 14: 15112188
Code 15: 15499680 Code 16: 15887172
Code 17: 16274664 Code 18: 16662156
3. PART TWO - Library Reference
3.1 Compiling and Linking
There are no special instructions for compiling your source code when using
functions from the PROTECTION PLUS library. However, there is one immediate
change to your application source code. The PUBLIC variable PP_CFILE must be
defined in your application containing the control filename. The ".PPP"
extension is appended automatically. See the "Function Reference" section
below for a coding example of this. Review the section "Reserved Words" on
page to make sure that variable names in your program do not conflict with
the public variables used in the library's functions.
There is only one change when linking. Add the appropriate library to your
link library list. That is, if you are using Clipper Summer '87, use
PPLUSS87.LIB; if you compile with Clipper 5.0, use PPLUS50.LIB. The location
of the PROTECTION PLUS library on your library link list is not important.
For all of our applications, it is placed as the last library in the list.
All function names used in the PROTECTION PLUS system are preceded with "pp_"
this is to easily (1) distinguish a name so that it is associated with
PROTECTION PLUS, and (2) keep your function names from possibly conflicting.
The PROTECTION PLUS library may be allocated to an overlay if you are using
Blinker in your application.
3.2 Commonly Asked Questions
These questions were asked through the Nanforum on CompuServe. Thank you to
the people that these, for it helped us explain how the product works.
Don Caton asked "Once the program is unlocked, what's to prevent someone from
copying the unlocked files to another computer? Obviously you must have some
way of uniquely identifying the computer or hard drive or both, so what about
backups and restores? What happens if they run a disk defragger that moves
the files around? How about if they replace the hard drive? What if they
have to reformat and/or repartition the drive because of a drive failure or
they want different partition sizes then they had before or they upgrade to a
different version of DOS? Will any of these things require a new
installation?"
Well here are the answers! When it comes to the term "unlock," there is a
distinction that you need to know. That is the difference between copy
protecting and execution limiting. If you would like to "copy-protect" your
application, once the application is received by the client he calls you,
follows a 10 second sequence of events, and the product is protected. This
protection CAN be backed up, restored, unfragmented (moved), copied from one
hard drive to a new one (on the same computer), and transferred to a new
version of DOS (also on the same computer). The protection is stored in a
"system" file. Any utility that can copy this file can manipulate the
protection at will. The application will only work, however, on the computer
that the protection was installed on.
Copy protection is separate from application limiting. That is, the
"unlocked" that we talk about means that the application is free to run
without expiring on a certain date or after a certain number of executions.
If you choose to copy protect the application AND limit it to a demo version,
you can unlock the demo version but still keep the copy protection. There is
NO WAY for you to "eliminate" copy protection from your application without
changing the source. You can, however, remotely disable the protection
from one computer and then remotely enable it on another by only a telephone
call from your user. This is great when he or she calls you up and asks to
move the application to another computer. You do not need to send them new
disks. If they copy the files to another computer, the copy protection
routines will simply not allow the program to work. You could, however, if
you choose to, add copy protection to any program anywhere remotely over the
phone. You can also run any other of your special "hidden" routines that you
do not want your user to perform unaided, remotely!
Roger Weiss asked "What is to keep a person from using a disk copy program, or
disk copy card from copying the distribution disks and then using the same
code to install it on several systems? I have found that using a "hardware
key" is the best copy protection around. They add about $40.00 to the cost of
the software, allow customers to make backups of the distribution disks and
keeps the software from being stolen. The customer can restore the code to a
drive without having to bother me. (I tend to be out of the office a lot and
like to keep the Cell. Phone bill down). Can your product cause the code to
revert to a "DEMO" mode if the correct key is not entered? I let all my
customers share their disks with others. If the hardware key is missing they
get a demo version. (To encourage the sharing I pay them a finders fee for
every copy sold off of a shared version.) I have seen a similar system used
where the customer had to call in every year or so, dependant upon the number
of times the program was started, for access codes."
Well, here are the answers! First, nothing is going to prevent a user from
using diskcopy or the like. However, the application will only work on the
computer that it was installed on. What happens is the application leaves
your drive unprotected. The user calls you up on the phone when they receive
the package. The tell you a number on their power-up screen. You type the
number in the library's unlock code utility and read them the number on your
screen. Their application is now protected for that computer only - and they
never have to call you again, even if they need to do backups and restores,
unfragmenting, etc. This code that they read you changes randomly (every
second). The codes on your computer change by the random number, every day!
Even if one user tells another user the unlock code, it will not work (unless
by chance they received the same random number on the same date). The odds of
this are minuscule. This protection is not as foolproof as the hardware key,
but it is a lot cheaper (since you are not limited to the number of users per
the one time fee).
As far as the automatic demo mode goes, you have COMPLETE CONTROL over what
happens when. The library was designed in such a way that if you use copy
protection and the copy protection failed the test, you can make it a demo,
abort, or whatever you want. You can make the user call every year, every
day, every month (on the 20th), after 10 executions, or whenever! Upon
demand, you can then remotely unlock it so that they never have to call you,
but it is still copy protected. This would be great for people who pay you
every month on lease, etc. Like I said, you have complete control!
Jon Cole asked "How does the product protect against a legitimate user making
a backup of the already installed product and restoring on another "identical"
system (ie same BIOS & hardware)?"
Unfortunately there is now way using either our method of copy protection OR
ANY method, could anyone determine one computer from another (identical one)
or stop unauthorized copies unless the hard disk itself is manipulated. This
writing data to a sector on the hard drive technique (at least in our
experience) requires protecting a floppy and mailing it to the user.
Obviously this user may require special disk shipments in the event of hard
disk failure and the like. We have eliminated that approach. Given two
identical computers, the application might would work. I say might because
I haven't actually found two computers that are identical that give me the
same copy protection password. Keep in mind that 99% of the unauthorized
copying of applications occurs between two unidentical computers. For all
practical purposes, our method is sufficient and definitely more convenient.
3.3 Function Reference
The following pages contain a list of functions in the PROTECTION PLUS
library. They are listed in alphabetical order. The setup of the manual is
identical to the Clipper 5.0 manual. The syntax defines a typical usage of
the function. The parameters to the function are inside the parenthesis, and
the arrow points to the return value. The first letters of the symbols used
represent the data type, either (D)ate, (N)umeric, (L)ogical, or (C)haracter.
The rest of the symbol characters are a name referenced in the description
section.
Most of the example code is from the SAMPLE.PRG file. This Clipper source
demonstrates most of the PROTECTION PLUS library functions along with tons of
comments.
The following NOTES are important and should be read before trying to use the
function library.
NOTE: All functions run PP_CHKPP() to verify that control file is sound. If
this function returns a false, the function called will return either the
"worst case" value or an error value. For example, if PP_EXPIRED() is run and
PP_CHKPP() failed during the execution, PP_EXPIRED() will return .T., to keep
the program from running.
NOTE: The PUBLIC variable PP_CFILE must be defined in your application
containing the control filename. The ".PPP" extension is appended
automatically.
Sample code
PUBLIC pp_cfile
pp_cfile="PROGNAME"
If your product initially goes out as a demo and gets unlocked, you might want
to destroy (overwrite, not just erase) the control file (.PPP) from the floppy
upon initialization. This is so that the smart user can't copy it over (in
the case of execution-count limiting) and have more time with the demo than
desired.
One thing to keep in mind is that this library was set up so that you have
total control of what happens when. The suggestions made in the sample source
code is only recommendations. You may set your system up however you choose.
You can be pretty creative at how the security is structured!
****************************************************************************
PP_ADVECT()
Increment the execution-limit counter
Syntax
PP_ADVECT() lStatus
Returns
.T. if successful, else .F.
Description
Increments the execution counter by one. The execution counter is stored
in the control file. The execution counter should be incremented once
just before the main menu of your application is executed for the first
time. That way, if password protection is used and the user types in the
wrong password and the program exits, he won't miss out on an execution.
Example
The first thing to do is right before the main menu is accessed for the first
time, the execution counter should be incremented if the expire type is set to
execution limit. EXE_LIMIT is a logical defined in the beginning of the
program that is .T. of the expiration type is "E" for EXE limit. We only need
to advance the counter if the EXE counter limiting is used
if exe_limit
pp_advect()
endif
See also PP_EXECT(), PP_EXELM(), PP_NEXECT(),
PP_NEXELM(), PP_NEXPTYPE()
****************************************************************************
PP_CENUM()
Return the current code entry number
Syntax
PP_CENUM() nNumber
Returns
The random number.
Description
Generates a random number and declares a PUBLIC flag for the user code
entry routine to use later. This is used when either copy protection is
used or other hidden routines are needed. On the power-up screen, this
number is displayed for the user to see. When special access is needed to
a routine, such as pp_copywrite(), the user tells you this number over the
phone, so you can find the correct code using either the client tracking
program or UNLOCK.EXE.
The number is random, and leads to the ability to secure hidden procedures
in your source code and only allow user access when he is online with you.
Protection Plus gives you eighteen hidden procedures. For example, say
you have a password function in your application and your user forgets his
password. He can call you, tell you the code entry number on the screen,
and you can run the decoder routine (in the host program) with his code
entry number as a parameter, and instantly tell him a number to type in
response to a special prompt, and the password check is overwritten. He
can then run the program, go to the password change function, and create a
new password for future use. Keep in mind, that the code entry number is
random, but the actual code to enter in the special prompt changes EVERY
DAY according to that number. It would be nearly impossible to break the
code, eliminating the possibility of one user calling another user and
using unauthorized codes. There are so many possibilities available for
this and associated functions. Use your imagination.
Example
@ 5,2 say "Code entry: "+ltrim(str(pp_cenum()))
See also UNLOCK.EXE, PP_UCODE()
****************************************************************************
PP_CHKPP()
Verify the integrity of the control file
Syntax
PP_CHKPP() lStatus
Returns
.T. if successful, else .F.
Description
Checks the validity of the control file. It is possible, however, for
this function to return a .T. for "file okay" when the data is garbaged.
This function call should be placed at the beginning of your application,
if even desired at all.
NOTE: All functions in the PROTECTION PLUS library that depend on the
control file call PP_CHKPP() to verify that control file is sound. If
this function returns a false, the function called will return either the
"worst case" value or an error value. For example, if PP_EXPIRED() is run
and PP_CHKPP() failed during the execution, PP_EXPIRED() will return .T.,
to keep the program from running.
Example
if !pp_chkpp()
?? "Error with application datafile"
?
cancel
endif
See also PP_CRPPP(), PP_SAVEPP()
****************************************************************************
PP_COMPNO()
Return the computer number
Syntax
PP_COMPNO() nNumber
Returns
A number representing a unique number of the computer.
Description
The pp_compno function is used optionally to give you a computer "number."
When the user first calls you to be unlocked (if copy protection is used),
you enter the number that appears on his screen into the customer record
of the client tracking program. If the user calls and says that his
computer hard drive crashed, and you need to copy protect him again, when
he calls back to unlock the "new hard drive" and this number is DIFFERENT,
he is trying to fool you and install your software on another computer.
This adds another level of security when the user "acts" stupid!
Example
In this example, the computer number was appended on to the end of the serial
number. This is to make the number a little more indistinguishable, since it
appears to be part of the serial number.
@ 4,2 say " Serial: "+pp_serial()+"/"+ltrim(str(pp_compno()))
See also PP_SERIAL()
****************************************************************************
PP_COPYCHK()
Verify the copy protection
Syntax
PP_COPYCHK() lResult
Returns
.T. if successful, else .F.
Description
Test the value of the copy protection stored on disk and compares it to
the application. This is a system file that is hidden to the user. The
user will not be able to decode this encryption. The protection will be
different for every piece of software for every library sold, every
computer out there, and every serial number of your application. If you
find a duplicate, please let us know so that we can write Guiness!
Example
If you would like to revert this program to a demo version in the even that
copy protection is invalid or not found, simple create a PUBLIC variable and
code the following.
demo_ver = !pp_copychk()
If you want the program not to work, code the following. Keep in mind that
when the user first installs the software, there will not be any copy
protection on his hard drive. He will need to call you first to create the
appropriate file. So, you will never be able to just "terminate" an
application if copy protection is not found. Because of this, refer to the
function PP_UCODE() on how to integrate this.
clear
get_code=0
If !pp_copychk()
@ 10,10 say "Enter code: " get get_code
read
if pp_ucode(get_code)=1
pp_copywrite()
else
clear
cancel
endif
endif
See also PP_COPYWRITE(), PP_KILLPROT(),
PP_UCODE()
****************************************************************************
PP_COPYWRITE()
Create the copy protection file
Syntax
PP_COPYWRITE() lResult
Returns
.T. if successful, else .F.
Description
Writes the copy protection file to be used by the pp_copychk() function.
This is a system file that is hidden to the user. The user will not be
able to decode this encryption. The protection will be different for
every piece of software for every library sold, almost every computer out
there, and every serial number of your application.
This function is usually part of a code entry function list. Your
application can be distributed as a demo. If the user wishes to give you
a credit card number or mail you a check, you can immediately unlock their
software by running this function.
Example
See the example in PP_COPYCHK().
See also PP_UCODE(), PP_COPYCHK(),
PP_KILLPROT()
****************************************************************************
PP_CRPPP()
Create a new control file with blank data
Syntax
PP_CRPPP() lResult
Returns
.T. always
Description
If the control file (.ppp file) gets erased and the master diskettes were
lost, this function can be used to create a dummy control file with blank
string data, serial number 1, demo expire type, and date()+15 day expire
date. This could be used temporarily until a new control file is
received. If your product initially goes out as a demo and gets unlocked,
you might want to destroy (overwrite, not just erase) the control file
(.PPP) from the floppy upon initialization. This is so that the smart
user can't copy it over (in the case of execution-count limiting) and have
more time with the demo than desired.
Example
This is most often implemented in one of the hidden user-code positions.
Refer to PP_UCODE() for more information on integrating.
get_code=0
@ 20,10 say "Enter code: " get get_code
read
&& define 5 as the "create blank ppp file" code
if pp_ucode(get_code)=5
pp_crppp()
endif
See also PP_CHKPP(), PP_SAVEPP(), PP_UCODE()
****************************************************************************
PP_EXECT()
Return the current execution counter value
Syntax
PP_EXECT() nNumber
Returns
Counter <nNumber> if successful, 0 upon error
Description
Retrieves the value of the EXE execution counter stored in the control
file.
Example
@ 10,20 say "Number of executions: "+ltrim(str(pp_exect()))
See also PP_NEXECT(), PP_EXPIRED(), PP_ADVECT(),
PP_EXELM(), PP_NEXELM(),
PP_NEXPTYPE()
****************************************************************************
PP_EXELM()
Return the current execution counter limit value
Syntax
PP_EXELM() nNumber
Returns
Counter limit <nNumber> if successful, 0 upon error
Description
Retrieves the value of the EXE execution counter limit stored in the
control file.
Example
@ 10,20 say "Execution limit: "+ltrim(str(pp_exelm()))
See also PP_NEXELM(), PP_EXPIRED(), PP_ADVECT(),
PP_EXECT(), PP_NEXECT(), PP_NEXPTYPE()
****************************************************************************
PP_EXPDATE()
Return the expiration date
Syntax
PP_EXPDATE() dExpireDate
Returns
<dExpireDate> is the expiration date of the product or date()-1 if the
control file is corrupted.
Description
Determines the date of expiration stored in the control file. If
pp_getvar() is used, propl10 contains the same information - use it
instead.
Example
Note that in the following example, propl10 and PP_EXPDATE() are totally
interchangeable. It is quicker, however to use propl10 since the disk access
will be limited to once and not twice. If the expire date is empty, we do not
print anything on the screen.
@ 7,61 say if(!empty(propl10),"Expires: "+dtoc(propl10),"")
See also PP_NEXPTYPE(), PP_EXPIRED(),
PP_UNLOCK(), PP_EXPTYPE(), PP_GETVAR()
****************************************************************************
PP_EXPIRED()
Is this application expired?
Syntax
PP_EXPIRED() lResult
Returns
.T. if the application is expired or the control file is corrupted, .F.
otherwise.
Description
Checks to see if first the current date is greater than the expire date.
If the expire type is set to "E", it checks to make sure that the
execution count is greater than the execution count limit. If either of
these conditions is true, the function returns .T..
Example
NOTE that if it has expired (by date) it is important to perform a
pp_upddate() (described later) so that the combination of the date checking
and the expiration date checking prohibit unauthorized use of your
application.
if pp_expired()
? "Sorry, but the demo for this product has expired... Please"
? "call and order from C.R.S. at 412-471-7638"
?
pp_upddate()
cancel
endif
See also PP_EXPDATE(), PP_NEXPTYPE(),
PP_UNLOCK(), PP_EXPTYPE(),
PP_UPDDATE()
****************************************************************************
PP_EXPTYPE()
Return the expiration type
Syntax
PP_EXPTYPE() cString
Returns
" " for error, or one of the following <N>one, <E>xe count, <D>emo,
<P>ayments.
Description
Retrieves the expiration type from the control file. If the control file
or the data in it is corrupted, a " " is returned.
Example
Set up some global flags. Is this an execution limit version? If it is, set
the flag EXE_LIMIT to .T. for use later in the program.
exe_limit=( pp_exptype() = "E" )
See also PP_NEXPTYPE(), PP_EXPDATE(),
PP_EXPIRED(), PP_UNLOCK()
****************************************************************************
PP_GETVAR()
Create PUBLIC variables from control file
Syntax
PP_GETVAR() lResult
Returns
.T. if data successfully retrieved, .F. if control file is corrupted.
Description
This function creates the following public variables and fills them with
the data contained in the control file.
propl1 client's company
propl2 client's name
propl3 client's address
propl4 client's city
propl5 client's state
propl6 client's zip
propl7 client's phone
propl8 product name long form
propl9 product serial number
propl10 expiration date
propl12 proplus user's company
propl13 proplus user's address line 1
propl14 proplus user's address line 2
propl15 proplus user's phone
propl16 proplus user's fax number
propl17 last date system used
propl18 last time system used
Example
if !pp_getvar()
? "Error reading control file... Call technical support!"
?
cancel
endif
See also PP_SAVEPP(), PP_CHKPP(), PP_CRPPP()
****************************************************************************
PP_KILLPROT()
Remove the copy protection
Syntax
PP_KILLPROT() lResult
Returns
.T. if successful, else .F.
Description
Will remove all copy protection from the current application. This
function, like most others, relies on the PUBLIC pp_cfile variable to be
defined as mentioned in the beginning notes. This function is most
commonly found as one of the hidden user-codes. Refer to PP_UCODE() to
see how to integrate this.
Example
if pp_killprot() && kill copy protection on hard drive
@ 2,0 say "Protection erased!"
endif
See also PP_COPYWRITE(), PP_COPYCHK(),
PP_UCODE()
****************************************************************************
PP_NEXECT()
Reset the execution counter value
Syntax
PP_NEXECT( <nNewCount> ) lResult
Arguments
<nNewCount> is the number to which to set the execution counter.
Returns
.T. if successful, else .F.
Description
Sets the execution counter, kept in the control file, to the number
specified. This function allows the execution counter to be changed from
within the application itself. This could be one of the hidden user-
codes.
Example
pp_nexect(0) && sets execution counter to zero
See also PP_EXELM(), PP_UCODE(), PP_EXECT(),
PP_ADVECT(), PP_NEXELM()
****************************************************************************
PP_NEXELM()
Reset a new execution limit value
Syntax
PP_NEXELM( <nNewLimit> ) lResult
Arguments
<nNewLimit> is the number to which to set the execution counter limit.
Returns
.T. if successful, else .F.
Description
Sets the execution counter, kept in the control file, to the number
specified. This function allows the execution counter limit to be changed
from within the application itself. This could be one of the hidden user-
codes.
Example
pp_nexelm(50) && extends the execution counter limit to 50.
See also PP_EXECT(), PP_EXELM(), PP_ADVECT(),
PP_NEXECT(), PP_UCODE()
****************************************************************************
PP_NEXPTYPE()
Reset the expiration type and date/exe limit
Syntax
PP_NEXPTYPE( <sType>, <dData> OR <nData> )
lResult
Arguments
<sType> is the new expiration type.
<dData> OR <nData> is the data associated with the expiration type.
Returns
.T. if successful, else .F.
Description
Resets the expire type to the <sType> given. Depending on what the value
of <sType> is, sets other applicable data. <sType> must be upper-case!
TYPE DATA
<P>ayments DATE of next payment (expiration)
<D>emo DATE of expiration
<E>xe count NUMBER (numeric) of executions allowed
Note that <N> is not a choice. To set expiration type to "N", use the
pp_unlock() function. This is also used to reset the expiration date.
Also note that when the type is changed to <E>, the expiration date field
is blanked and the execution counter is zeroed. When the type is changed
to <P> or <D>, the execution limit and counter is zeroed. This could be
one of the hidden user-codes. Refer to PP_UCODE() for information on how
to integrate this.
Example
*Set next expiration type to <P>ayments and make it expire on
*the next payment date around the 20th of next month
if pp_nexptype("P",pp_npdate(date(),20))
@ 2,0 say "Application payment expire date extended to"+;
dtoc(pp_npdate(date(),20))
endif
-OR-
*Set the next expiration type to <D>emo and make it expire on 12/31/91
if pp_nexptype("D",ctod("12/31/91"))
@ 2,0 say "Application demo expire date set to 12/31/91"
endif
See also PP_EXPIRED(), PP_UNLOCK(), PP_NPDATE()
PP_EXPTYPE(), PP_EXPDATE(), PP_UCODE()
****************************************************************************
PP_NPDATE()
Return next payment date
Syntax
PP_NPDATE( <dDate>, <nDay> ) dDate
Arguments
<dDate> is a date in the current month.
<nDay> is the day of next month that payment is due.
Returns
Date of next payment due.
Description
The <nDay>th day in the month after the month of <dDate> is returned. If
this day happens to be on a weekend, the next Monday date is returned.
This function is used in conjunction with pp_nexptype(). Together with
the user-code, your client can call you up after you receive his monthly
check, type in the appropriate user-code and have his product work until
next month.
Example
*Set next expiration type to <P>ayments and make it expire on
*the next payment date around the 20th of next month
if pp_nexptype("P",pp_npdate(date(),20))
@ 2,0 say "Application payment expire date extended to"+;
dtoc(pp_npdate(date(),20))
endif
See also PP_NEXPTYPE(), PP_UCODE()
****************************************************************************
PP_SAVEPP()
Save changed control file data
Syntax
PP_SAVEPP() lResult
Returns
.T. always
Description
This function is used if you would like to give the user the ability to
change the string data stored in the configuration file upon request. It
is necessary to first call the pp_getvar() function to create the PUBLIC
variables. The variables can then be changed. Call this function after
the variables are changed to store them into the control file. Note the
importance of the data type.
Example
*Assuming that PP_GETVAR() has already been run:
@ 10,10 say "Enter new company: " get propl1
@ 11,10 say " Enter new name: " get propl2
@ 12,10 say "Enter new address: " get propl3
@ 13,10 say " Enter new city: " get propl4
@ 14,10 say " Enter new state: " get propl5
@ 15,10 say " Enter new ZIP: " get propl6
read
pp_savepp()
See also PP_CRPPP(), PP_CHKPP()
****************************************************************************
PP_SERIAL()
Return the product serial number
Syntax
PP_SERIAL() cString
Returns
Serial number as a string, "ERROR" or "ZZZZZZ".
Description
Returns the serial number of the product. If hard-coded serial numbers is
used, this number is returned. Otherwise the serial number in the control
file is returned. If hard-coded serial numbers is not being used and the
control file is corrupted, "ERROR" will be returned. If either method is
used, but the product has not been stamped with PROPLUS.EXE, "ZZZZZZ" will
be returned.
NOTE: This function MUST be included in your source code if you intend on
using copy protection. Whether or not you display the actual number, you
must include it so that the application is stamped as unique. If you do
not use copy protection, however, it is not required.
Example
@ 4,2 say "Serial: "+pp_serial()
See also PP_COMPNO()
****************************************************************************
PP_UCODE()
Return user (hidden) code
Syntax
PP_UCODE( <nNumber> ) nResult
Arguments
<nNumber> is the number input from the user.
Returns
Number between 0 and 18.
Description
Compares the code entry value passed to today's code entry numbers for the
given code entry random number generated previously with pp_cenum(). If
the value is correct, it returns a number from 1-18 to represent the
"hidden" function to be run. Otherwise, a zero is returned indication
either an error in parameter type or invalid code. This is where the
great flexibility lies in the PROTECTION PLUS library. You have the
complete control over what you want to do, and what you would like to hide
from your users, while still keeping the capability of your procedures
available at your request.
Example
The following example is from an application's power-up screen. The first
thing here is the entering of the password. Notice how a set key statement is
used for the user-code function.
set key -4 to ucode && F5 for hidden routines
password=space(8)
do while empty(password) .AND. !lastkey()=27
@ 20,28 clear to 20,60
@ 20,30 say "Password: " get password picture "@!"
read
enddo
set key -4 to
* Write your own code here to test password and continue program if ok.
if password#"PROPLUS "
pp_upddate()
set color to
clear
@ 2,0 say "Incorrect password entered, program aborted!"
@ 4,0 say ""
cancel
endif
At this point, the program is allowed to continue. This is where you would
stick the first "DO" command to execute your main menu or whatever you do
next.
do main_menu
This function UCODE() you create to get the secret number after the user
signals the code entry key sequence, whatever you define. For the purposes of
this demo, only the result routine number is printed on the screen. In your
application, you could set up a set of case statements for each value (1-18)
to carry out your routines. A zero is returned if an invalid value was
entered. The program can execute a function and continue with the program or
execute a function and cancel to dos. You have complete control! All of
these functions drop to dos after executing.
FUNCTION ucode
PRIVATE _routine
clear gets
get_code=0
@ 20,28 say "Enter code: " get get_code picture "@Z"
read
if lastkey()=27
retu .T.
endif
_routine=pp_ucode(get_code)
set color to
clear
do case
case _routine=1 && unlock application
if pp_unlock()
@ 2,0 say "Application unlocked..."
endif
case _routine=2 && advance payment date
if pp_nexptype("P",pp_npdate(date(),20))
@ 2,0 say "Application payment expire date "+;
extended to "+dtoc(pp_npdate(date(),20))
endif
case _routine=3 && kill protection from disk
if pp_killprot()
@ 2,0 say "Protection erased!"
endif
case _routine=4
if pp_nexptype("D",ctod("4/10/91"))
@ 2,0 say "Application demo expire date set "+;
"to 4/1/91"
endif
case _routine=10 && write copy protection file
pp_copywrite()
case _routine=0 && error
retu .F.
endcase
@ 4,0 say ""
exit_program()
return .T.
See also PP_NEXECT(), PP_NEXELM(),
PP_NEXPTYPE(), PP_NPDATE(),
PP_UNLOCK(), PP_UPDDATE()
****************************************************************************
PP_UNLOCK()
Unlock the program (from date/exe expiration)
Syntax
PP_UNLOCK() lResult
Returns
.T. if successful, else .F.
Description
Updates the control file to make the expiration type "N" for none and
empties the expiration date field. This is most commonly found as one of
the hidden user-codes. Upon the completion of payment from your client,
you may unlock him from any type of expiration type (either date or exe
counts). This leaves all copy protection intact. Refer to "Commonly
Asked Questions" on page for more information about application limiting
and unlocking versus copy protection. Refer to PP_UCODE() to see how to
integrate this function as a user-code.
Example
if pp_unlock()
@ 2,0 say "Application unlocked..."
endif
See also PP_UCODE(), PP_NEXPTYPE()
****************************************************************************
PP_UPDDATE()
Updates the last time used fields
Syntax
PP_UPDDATE() lResult
Returns
.T. if successful, else .F.
Description
Stores the current value of date() and time() in the control file. This
should be run upon exiting the program. This is because if the user keeps
setting back the clock, it would be impossible to avoid the narrowing
window. If he uses the program for an hour every day, eventually, no
matter how much he changes the date and time, will not be able to access
the program. This occurs provided that you run the check date function
pp_valdate() upon entry.
Example
A function to clean up screen and update the last used date and time is
recommended. The last used date and time should be updated upon exiting
because if the user keeps setting back the clock, it would be impossible to
avoid the narrowing window. If he uses the program for an hour every day,
eventually, no matter how much he changes the date and time, will not be able
to access the program. This occurs provided that you run the check date
function pp_valdate upon entry.
FUNCTION exit_program
pp_upddate()
set color to
clear
cancel
return .T.
NOTE that if it has expired (by date) it is important to perform a
pp_upddate() (described later) so that the combination of the date checking
and the expiration date checking prohibit unauthorized use of your
application.
if pp_expired()
? "Sorry, but the demo for this product has expired... "
? "Please call and order from C.R.S. at 412-471-7638"
?
pp_upddate()
cancel
endif
See also PP_UCODE(), PP_VALDATE()
****************************************************************************
PP_VALDATE()
Validates last date/time used
Syntax
PP_VALDATE() lResult
Returns
.T. if the current date and time > last date and time used, .F. otherwise
or on error.
Description
Makes sure that the last date and time used, stored in the control file,
is less than the current date and time.
Example
The following checks the date and the time to make sure that the last date and
time used is less than the current date and time. If not, the user is trying
to "back up" the computer clock in order to gain more time from your running
demo or payment package. This check is only valid IF the current expire type
is NOT "None" (which means unlocked). The test is run once. If it fails, the
user can enter the new date and time. If it still fails then he is given an
option to enter a code number. This is just in case the user accidentally
forwards his DOS date to an advanced value and runs the program and then sets
it back correctly. If you do not follow this two step check as shown below,
the user will NEVER be able to set his clock back to the right date and run
your application. Upon entering the correct code number, the current DOS date
and time is saved into the last used date and time field in the control file.
if !pp_valdate() .AND. pp_exptype()#"N"
clear
curr_date=date()
curr_time=time()
@ 2,0 say "Please set the date and time correctly:"
?
?
run date
@ 7,0 say ""
run time
endif
if !pp_valdate() .AND. pp_exptype()#"N"
clear
@ 2,0 say "The date and time is still incorrect. Please call"+;
" technical support"
@ 3,0 say "for assistance. Code entry #:"+;
ltrim(str(pp_cenum()))+" Date: "+dtoc(date())
get_code=0
@ 5,0 say "Enter code: " get get_code picture "@Z"
read
if pp_ucode(get_code)=5 && arbitrary number chosen by you
pp_upddate()
pp_getvar() && get new values since they just changed
else
clear
cancel
endif
endif
See also PP_UPDDATE(), PP_UCODE()
3.4 Function quick-reference list
pp_advect() Increment the execution-limit counter
pp_cenum() Return the current code entry number
pp_chkpp() Verify the integrity of the control file
pp_compno() Return the "computer number"
pp_copychk() Verify the copy protection
pp_copywrite() Create the copy protection file
pp_crppp() Create a new control file
pp_exect() Return the current execution counter value
pp_exelm() Return the current execution limit value
pp_expdate() Return the expiration date
pp_expired() Is this application expired?
pp_exptype() Return the expiration type
pp_getvar() Create PUBLIC variables from control file
pp_killprot() Remove the copy protection
pp_nexect() Reset the execution counter value
pp_nexelm() Reset a new execution limit value
pp_nexptype() Reset the expiration type and date/exe limit
pp_npdate() Return next payment date
pp_savepp() Save changed control file data
pp_serial() Return the product serial number
pp_ucode() Return user (hidden) code
pp_unlock() Unlock the program (from date/exe expiration)
pp_upddate() Updates the last time used fields
pp_valdate() Validates last date/time used
3.5 Reserved Words
The following variable names are reserved. They can not be used as variable
names elsewhere in your application. These variables are only reserved if you
call PP_GETVAR(). The purpose of these variables is to allow you to display
licensing information stored in the control file. If you intend to use
PP_GETVAR(), do not use these variable names elsewhere in your program.
PROPL1
PROPL2
PROPL3
PROPL4
PROPL5
PROPL6
PROPL7
PROPL8
PROPL9
PROPL10
PROPL12
PROPL13
PROPL14
PROPL15
PROPL16
PROPL17
PROPL18
4. Sample Source
Ok, do you like looking at source code? Good! This is the section of the
manual that demonstrates various ways you can utilize the power and
versatility of PROTECTION PLUS. The file SAMPLE.PRG contains a typical
application that includes almost every basic feature of the library. This
file is well documented. The examples in this section break apart the
different modes of operation, from copy protection to execution-count
limiting.
4.1 To Copy Protect
There are five simple functions that you need to be familiar with in order to
copy protect you application. First, PP_UCODE() will be used to "hide" the
functions PP_COPYWRITE(), PP_CENUM(), PP_COPYCHK(), and PP_KILLPROT().
PP_UCODE(), as we will now call the "user-code function," is added most
commonly with the set key to statement. That way, when a user presses a
function key (let's use F5), a pop up will then display a number and ask for
a number. The number displayed is the code entry number. This number is
explained under PP_CENUM() in the function reference. The number the user has
to type in is one of the unlock codes. The number he (the user) types in is
passed to PP_UCODE(). This function will then decode the number, and return a
number between zero and eighteen (0-18). This number corresponds to the user
code to which you assign functions. Usually a DO CASE structure is employed
to determine which function to run. If the function PP_UCODE() returns a zero
(0), the code entered was invalid.
Once the structure is set up, you can place the other functions PP_COPYWRITE()
and optionally PP_KILLPROT() in the DO CASE structure. These functions create
the copy protection file and erase the protection file, respectively. Refer
to the file SAMPLE.PRG function UCODE() for an example of this.
4.2 Monthly Unlock (payments)
Creating an application that must be unlocked every month on a certain day is
simple. This would be used if, for example, your application is leased. The
same basic method described in To Copy Protect dealing with PP_UCODE() is
used. If copy protection is used, the method described in that section will
be implemented along with at least two other functions for the payments.
PP_NPDATE() will return the date for the given day of the month that you would
like to expire. If that day is on a weekend, it will return the next Monday.
PP_NEXPTYPE() is used in conjunction with this function to advance the next
expiration date. You would pass it a "P" for payments and PP_NPDATE() as
shown in the file SAMPLE.PRG. Last, the application leaves your computer
serialized and ready to expire on the day of next month that you setup. You
have total control on how the system is setup!
4.3 Application with Modules
If your application is sold in modules, and the user can purchase only what he
needs, you could actually ship him the entire package. How you would set it
up, assuming that every module has a separate EXE file, is assign a different
control file to each module. This would be done even if the program is not
packaged as separate EXE files. In PROPLUS.EXE, you would have a client
record for every client and every module in that package. This might be a bit
cumbersome at first, but look at the power you have. You could, at will,
enable a module to work as a demo remotely. This would be great if your user
calls you up and says he is now interested in another one of your modules.
You could, over the phone, enable the module he wants, and not have to worry
about it stopping on a certain day or after so many executions.
This is how it is set up. First, the main EXE file (or main menu routine),
will have its normal control file. When the user presses the menu function
that calls a module, change the value of PP_CFILE to reflect the new module.
You can then see if it is unlocked. If it is, run the program, else print a
message or whatever else you want. BE SURE to change PP_CFILE back to its
original value when complete with that module. When you change the status of
a module for a client, use PROPLUS.EXE to keep track of when it was installed,
when it will expire, etc. At the touch of a button, you will know which of
your clients is using which modules.
The addition of protection or demo modes for the main program and its modules
is all controlled through the PP_UCODE() function. Refer to this function for
coding examples. You could even "nest" the user-code values to effectively
achieve more than 18 hidden user-codes.
5. PROPLUS Programming Service
┌─────────────────────────────────────┐
│ PPS - ProPlus Programming Support │
└─────────────────────────────────────┘
We realize that adding this level of protection to your programs may not be
easy, therefore we have developed this program to allow you to purchase
PROPLUS and let us do the programming for you at a very nominal rate.
If you need help in installing PROPLUS functions into your program, send the
top of your program (from line 1 till the first DO) on a 5 1/4 or 3 1/2 inch
disk.
List the types of protection that you would like incorporated into your
program. We will add the needed functions and send your fully tested source
code back to you.
All you need to do is insert it back into the top of your program, recompile,
link and it's ready to distribute.
┌───────────────────────────────────────────┐
│ What do I do to get PPS working for me? │
└───────────────────────────────────────────┘
List the protections that you would like to have added to your program here by
entering the names in the Action blanks and the meaning next to it . If you
want a certain code to call your functions, enter your function_name() on the
Action blank. If you want a certain code to call a procedure, write DO
your_proc on the Action blank.
IE:
┌─────────┬──────────────────────────┬───────────────────────────┐
│ Code # │ ACTION │ MEANING │
├─────────┼──────────────────────────┼───────────────────────────┤
│ Code 1: │ pp_copywrite() │ Activate Protection File │
│ Code 2: │ DO zap │ Empty users database │
└─────────┴──────────────────────────┴───────────────────────────┘
Enter your desired actions and meanings below.
┌─────────┬──────────────────────────┬───────────────────────────┐
│ Code # │ ACTION │ MEANING │
├─────────┼──────────────────────────┼───────────────────────────┤
│ Code 1: │________________________ │ ________________________ │
│ Code 2: │________________________ │ ________________________ │
│ Code 3: │________________________ │ ________________________ │
│ Code 4: │________________________ │ ________________________ │
│ Code 5: │________________________ │ ________________________ │
│ Code 6: │________________________ │ ________________________ │
│ Code 7: │________________________ │ ________________________ │
│ Code 8: │________________________ │ ________________________ │
│ Code 9: │________________________ │ ________________________ │
│ Code 10:│________________________ │ ________________________ │
│ Code 11:│________________________ │ ________________________ │
│ Code 12:│________________________ │ ________________________ │
│ Code 13:│________________________ │ ________________________ │
│ Code 14:│________________________ │ ________________________ │
│ Code 15:│________________________ │ ________________________ │
│ Code 16:│________________________ │ ________________________ │
│ Code 17:│________________________ │ ________________________ │
│ Code 18:│________________________ │ ________________________ │
└─────────┴──────────────────────────┴───────────────────────────┘
The charge for this service is $75.00 per source file changed.
For us to return this via US Mail add $2.50 S&H. For us to return this via
Federal Express Next Day add $18.00 S&H.
All checks and money orders must be made out in US Dollars.
Name _________________________________________________________________
Company _________________________________________________________________
Address _________________________________________________________________
_________________________________________________________________
City _______________________________ State __________ Zip ___________
Phone (_____)______-________ Country _________________________
PPS $ 75.00
Shipping $__________________
Total $__________________ (Please attach payment)
Comments/Suggestions:
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________